/*
 * movingobject.h
 *
 *  Created on: Mar 12, 2009
 *      Author: iveb
 * @author Pieter Nys <pieter-nys@hotmail.com>
 * @date    01/03/11
 */
 

#ifndef MOVINGOBJECT_H_
#define MOVINGOBJECT_H_


#include <iostream>

#include "waypoint.h"
#include "../thread.h"

using namespace std;

class MovingObject {
public:
        // Constructors
        void        init();
	MovingObject();
        MovingObject(string id);
	virtual     ~MovingObject();

        // Getters en setters
	void        setWp(WayPoint);
	WayPoint    getWp();
	WayPoint    getWpPrev();
        
        void        setWpGoal(WayPoint);
        WayPoint    getWpGoal();

        void        setID(string id);
        string      getID();

        // Berekende dingen
	WayPoint    getWpNext(double);
        WayPoint    getWpIntersection(MovingObject);

private:
        // Vorige WayPoints
	WayPoint    wpPrev_;
	WayPoint    wpPrev2_;
	WayPoint    wp_;

        // Het doel
        WayPoint    wpGoal;
        
        //Identificeert het object
        string      id;

	pthread_mutex_t	wpMutex;
        
};

#endif /* MOVINGOBJECT_H_ */
